<template>
  <div class="main">
    <router-view :video_data="video_data"></router-view>
  </div>
</template>

<script>
import { getwzData,getwzDatatwo,getwzDatathree,getescapeData,getLOLData,getStarData } from "../src/api/video_data";
export default {
  data() {
    return {
      video_data: [],
      video_data_id: 7,
    };
  },
  created() {
    //首页数据
    getwzData({
      vid: "203893040482622289",
      pd: "h5",
      act: "h5Rec",
    }).then((data) => {
      data.data.response.videos.forEach((item) => {
        this.video_data.push({
          id: this.video_data_id,
          video: item.play_url,
        });
        this.video_data_id += 1;
      });
      console.log(this.video_data);
    });
    //首页数据
    getwzDatatwo({
      vid: "2811538290457935375",
      title:'王者荣耀：百里守约超燃击杀集锦，堪称峡谷98K，看得热血沸腾！',
      pd: "h5",
      act: "h5Rec",
    }).then((data) => {
      data.data.response.videos.forEach((item) => {
        this.video_data.push({
          id: this.video_data_id,
          video: item.play_url,
        });
        this.video_data_id += 1;
      });
      console.log(this.video_data);
    });
    //tab1
    getwzDatathree({
      vid: "15691567278524369938",
      title:'王者超燃原声：我无敌，你随意！',
      pd: "h5",
      act: "h5Rec",
    }).then((data) => {
      data.data.response.videos.forEach((item) => {
        this.video_data.push({
          id: this.video_data_id,
          video: item.play_url,
        });
        this.video_data_id += 1;
      });
      console.log(this.video_data);
    });
    //tab2
    getescapeData({
      vid: "3225853399369742617",
      title:'王者荣耀超燃原声混剪',
      pd: "h5",
      act: "h5Rec",
    }).then((data) => {
      data.data.response.videos.forEach((item) => {
        this.video_data.push({
          id: this.video_data_id,
          video: item.play_url,
        });
        this.video_data_id += 1;
      });
      console.log(this.video_data);
    });
    //tab3
    getLOLData({
      vid: "8003332279456858112",
      title:'荣耀高燃语录：铠超燃原声，一个人可以被毁灭，但绝不会被打败！',
      pd: "h5",
      act: "h5Rec",
    }).then((data) => {
      data.data.response.videos.forEach((item) => {
        this.video_data.push({
          id: this.video_data_id,
          video: item.play_url,
        });
        this.video_data_id += 1;
      });
      console.log(this.video_data);
    });
    //tab4
    getStarData({
      vid: "4701541897046796580",
      title:'《王者荣耀》超燃哲理语录原声《射手篇》',
      pd: "h5",
      act: "h5Rec",
    }).then((data) => {
      data.data.response.videos.forEach((item) => {
        this.video_data.push({
          id: this.video_data_id,
          video: item.play_url,
        });
        this.video_data_id += 1;
      });
      console.log(this.video_data);
    });
  },
};
</script>

<style lang="scss" scoped>
@import "./assets/css/base.css";
</style>
